\hypertarget{classString}{\section{String类 参考}
\label{classString}\index{String@{String}}
}
\subsection*{静态 Public 成员函数}
\begin{DoxyCompactItemize}
\item 
static \hyperlink{classString_a0e527560f115b059be07ce94e839769c}{password} (\$password, \$encrypt='')
\item 
static \hyperlink{classString_a172acdef033b06452ae33c37ee71fff8}{uuid} ()
\item 
static \hyperlink{classString_a8a8509e4c9c51af0559dad799cdbdc7f}{key\-Gen} ()
\item 
static \hyperlink{classString_a22057e05a0e0c39b5e31a3dafa06f4c3}{rand\-String} (\$len=6, \$type='', \$add\-Chars='')
\item 
static \hyperlink{classString_a1ced9f227dd06fa204afcf20438072e8}{build\-Count\-Rand} (\$number, \$length=4, \$mode=1)
\item 
static \hyperlink{classString_a0659d8452d6a2b2b67fab3b3f50965ee}{build\-Format\-Rand} (\$format, \$number=1)
\item 
static \hyperlink{classString_a6cdc342eff7d83b45d7fad8da49e1458}{rand\-Number} (\$min, \$max)
\item 
\hypertarget{classString_a2809b58d7cb457a9925048ba56f08ece}{static {\bfseries auto\-Charset} (\$string, \$from='gbk', \$to='utf-\/8')}\label{classString_a2809b58d7cb457a9925048ba56f08ece}

\end{DoxyCompactItemize}


\subsection{详细描述}
string 类 生成随机字符串等 \begin{DoxyAuthor}{作者}
七觞酒  \href{mailto:739800600@qq.com}{\tt 739800600@qq.\-com} 
\end{DoxyAuthor}
\begin{DoxyDate}{日期}
2013-\/1-\/20 
\end{DoxyDate}


\subsection{成员函数说明}
\hypertarget{classString_a1ced9f227dd06fa204afcf20438072e8}{\index{String@{String}!build\-Count\-Rand@{build\-Count\-Rand}}
\index{build\-Count\-Rand@{build\-Count\-Rand}!String@{String}}
\subsubsection[{build\-Count\-Rand}]{\setlength{\rightskip}{0pt plus 5cm}static String\-::build\-Count\-Rand (
\begin{DoxyParamCaption}
\item[{}]{\$number, }
\item[{}]{\$length = {\ttfamily 4}, }
\item[{}]{\$mode = {\ttfamily 1}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{classString_a1ced9f227dd06fa204afcf20438072e8}
生成一定数量的随机数，并且不重复 
\begin{DoxyParams}[1]{参数}
integer & {\em \$number} & 数量 \\
\hline
int & {\em \$length} & \\
\hline
int & {\em \$mode} & \\
\hline
\end{DoxyParams}
\hypertarget{classString_a0659d8452d6a2b2b67fab3b3f50965ee}{\index{String@{String}!build\-Format\-Rand@{build\-Format\-Rand}}
\index{build\-Format\-Rand@{build\-Format\-Rand}!String@{String}}
\subsubsection[{build\-Format\-Rand}]{\setlength{\rightskip}{0pt plus 5cm}static String\-::build\-Format\-Rand (
\begin{DoxyParamCaption}
\item[{}]{\$format, }
\item[{}]{\$number = {\ttfamily 1}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{classString_a0659d8452d6a2b2b67fab3b3f50965ee}
带格式生成随机字符 支持批量生成 但可能存在重复 
\begin{DoxyParams}[1]{参数}
string & {\em \$format} & 字符格式 \subsection*{表示数字 $\ast$ 表示字母和数字 \$ 表示字母}\\
\hline
integer & {\em \$number} & 生成数量 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
string $|$ array 
\end{DoxyReturn}
\hypertarget{classString_a8a8509e4c9c51af0559dad799cdbdc7f}{\index{String@{String}!key\-Gen@{key\-Gen}}
\index{key\-Gen@{key\-Gen}!String@{String}}
\subsubsection[{key\-Gen}]{\setlength{\rightskip}{0pt plus 5cm}static String\-::key\-Gen (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{classString_a8a8509e4c9c51af0559dad799cdbdc7f}
生成\-Guid主键 \begin{DoxyReturn}{返回}
Boolean 
\end{DoxyReturn}
\hypertarget{classString_a0e527560f115b059be07ce94e839769c}{\index{String@{String}!password@{password}}
\index{password@{password}!String@{String}}
\subsubsection[{password}]{\setlength{\rightskip}{0pt plus 5cm}static String\-::password (
\begin{DoxyParamCaption}
\item[{}]{\$password, }
\item[{}]{\$encrypt = {\ttfamily ''}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{classString_a0e527560f115b059be07ce94e839769c}
对用户的密码进行加密 
\begin{DoxyParams}{参数}
{\em \$password} & \\
\hline
{\em \$encrypt} & //传入加密串，在修改密码时做认证 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
array/password 
\end{DoxyReturn}
\hypertarget{classString_a6cdc342eff7d83b45d7fad8da49e1458}{\index{String@{String}!rand\-Number@{rand\-Number}}
\index{rand\-Number@{rand\-Number}!String@{String}}
\subsubsection[{rand\-Number}]{\setlength{\rightskip}{0pt plus 5cm}static String\-::rand\-Number (
\begin{DoxyParamCaption}
\item[{}]{\$min, }
\item[{}]{\$max}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{classString_a6cdc342eff7d83b45d7fad8da49e1458}
获取一定范围内的随机数字 位数不足补零 
\begin{DoxyParams}[1]{参数}
integer & {\em \$min} & 最小值 \\
\hline
integer & {\em \$max} & 最大值 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
string 
\end{DoxyReturn}
\hypertarget{classString_a22057e05a0e0c39b5e31a3dafa06f4c3}{\index{String@{String}!rand\-String@{rand\-String}}
\index{rand\-String@{rand\-String}!String@{String}}
\subsubsection[{rand\-String}]{\setlength{\rightskip}{0pt plus 5cm}static String\-::rand\-String (
\begin{DoxyParamCaption}
\item[{}]{\$len = {\ttfamily 6}, }
\item[{}]{\$type = {\ttfamily ''}, }
\item[{}]{\$add\-Chars = {\ttfamily ''}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{classString_a22057e05a0e0c39b5e31a3dafa06f4c3}
产生随机字串，可用来自动生成密码 默认长度6位 字母和数字混合 支持中文 
\begin{DoxyParams}[1]{参数}
int | string & {\em \$len} & 长度 \\
\hline
string & {\em \$type} & 字串类型 0 字母 1 数字 2大写字母 3小写字母 4汉字 其它 混合 \\
\hline
string & {\em \$add\-Chars} & 额外字符 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
string 
\end{DoxyReturn}
\hypertarget{classString_a172acdef033b06452ae33c37ee71fff8}{\index{String@{String}!uuid@{uuid}}
\index{uuid@{uuid}!String@{String}}
\subsubsection[{uuid}]{\setlength{\rightskip}{0pt plus 5cm}static String\-::uuid (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{classString_a172acdef033b06452ae33c37ee71fff8}
生成\-U\-U\-I\-D 单机使用  public \begin{DoxyReturn}{返回}
string 
\end{DoxyReturn}


该类的文档由以下文件生成\-:\begin{DoxyCompactItemize}
\item 
templi/String.\-class.\-php\end{DoxyCompactItemize}
